/**
 * 可异步执行操作
 * 以对象形式分发
 * store.dispatch({type: 'saveUser',user: 10})
 *  以载荷形式分发
 * store.dispatch('saveUser', {user: 10})
 */
import * as types from './mutation-types'
const actions = {
  saveUser: ({commit, state}, {user}) => {
    commit(types.SET_USER, user)
  }
}
export default actions
